#!/usr/bin/perl
# strict and warnings, basic :D
use strict; 
use warnings; 
use CGI; my $cgi=new CGI;

# carriage return for correct and good-looking html and importing filename
my $br=" <br />\n";

# Parameters
our %plugin_config; my $ln;
my $file=$plugin_config{'file'};
my $title=$plugin_config{'title'};

# Open
open (FILE,'<',$file)||die "$! $file";my $res;

# Replace carriage returns with html ones...
while (<FILE>){$ln++;
	s/\n/$br/g;
	if (/^\*/){# If starts with *
			# This is a list main item
			# Modify $_, just a regex thing :)
		}
	else{
		if (/^\#/){# If starts with # 
			# This is a list secondary item 
			# Modify $_;	
			  }
	    }
			
	$res.=$_;
	
	}

# close
close FILE;

# Make it good html
$title=$cgi->h1($title);
$res=$cgi->p($res);

# and return
return $title.$res;
